using System;
using EnvDTE;
using Microsoft.VisualStudio.Project;
using Microsoft.VisualStudio.Project.Automation;

namespace Microsoft.WowAddonStudio.Tests.Common.Mocks
{
	/// <summary>
	/// Represents a mock project in the integrated development environment (IDE).
	/// </summary>
    public class MockOAProject : OAProject
	{
		private ProjectNode projectNode;
        private Properties properties;
        private DTE dte;

		/// <summary>
		/// Initializes a new instance of the <see cref="MockOAProject"/> class.
		/// </summary>
		/// <param name="dte">The DTE.</param>
		public MockOAProject(DTE dte)
			: this(dte, null)
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="MockOAProject"/> class.
		/// </summary>
		/// <param name="dte">The DTE.</param>
		/// <param name="properties">The properties.</param>
		public MockOAProject(DTE dte, Properties properties) : base(null)
		{
			this.dte = dte;
            this.properties = properties;
		}

		/// <summary>
		/// Sets the DTE.
		/// </summary>
		/// <param name="dte">The DTE.</param>
		public void SetDTE(DTE dte)
		{
			this.dte = dte;
		}

		/// <summary>
		/// Saves the solution, project, or project item.
		/// </summary>
		/// <param name="NewFileName">Required. The file name with which to save the solution, project, or project item. If the file exists, it is overwritten.</param>
		public override void SaveAs(string NewFileName)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Saves the project or project item.
		/// </summary>
		/// <param name="fileName">Optional. The name in which to save the project or project item.</param>
        public override void Save(string fileName)
		{
			throw new NotImplementedException();
		}

		/// <summary>
		/// Removes the project from the current solution.
		/// </summary>
        public override void Delete()
		{
			throw new NotImplementedException();
		}



		/// <summary>
		/// Microsoft Internal Use Only. Specfies if the project is dirty.
		/// </summary>
		/// <value></value>
        public override bool IsDirty
		{
			get { throw new NotImplementedException(); }
			set { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the Projects collection containing the Project object supporting this property.
		/// </summary>
		/// <value></value>
        public override Projects Collection
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the top-level extensibility object.
		/// </summary>
		/// <value></value>
		public override DTE DTE
		{
			get { return dte; }
		}

		/// <summary>
		/// Gets a ProjectItems collection for the Project object.
		/// </summary>
		/// <value></value>
        public override ProjectItems ProjectItems
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets a collection of all properties that pertain to the Project object.
		/// </summary>
		/// <value></value>
        public override Properties Properties
        {
            get { return properties; }
        }


		/// <summary>
		/// Gets an interface or object that can be accessed by name at run time.
		/// </summary>
		/// <value></value>
		public override object Object
		{
			get
			{
				if (projectNode == null)
					projectNode = new MockProjectNode();
				return projectNode;
			}
		}



		/// <summary>
		/// Gets the ConfigurationManager object for this Project .
		/// </summary>
		/// <value></value>
		public override ConfigurationManager ConfigurationManager
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the Globals object containing add-in values that may be saved in the solution (.sln) file, the project file, or in the user's profile data.
		/// </summary>
		/// <value></value>
		public override Globals Globals
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets a ProjectItem object for the nested project in the host project.
		/// </summary>
		/// <value></value>
		public override ProjectItem ParentProjectItem
		{
			get { throw new NotImplementedException(); }
		}

		/// <summary>
		/// Gets the CodeModel object for the project.
		/// </summary>
		/// <value></value>
		public override CodeModel CodeModel
		{
			get { throw new NotImplementedException(); }
		}

	}
}